<template>

  <el-form ref="ruleFrom" :model="ruleFrom"  label-width="100px">
    <el-page-header content="详情页" @back="goBack" />
    <el-row style="margin-top: 30px">
      <!--基本输入框-->
      <el-col :span="5">
        <el-form-item label="销毁单" prop="name1">
          {{ruleFrom.destroyId}}
        </el-form-item>
      </el-col>
      <!--基本单选框-->
      <el-col :span="5">
        <el-form-item label="销毁人：" prop="name2">
          {{ruleFrom.destroyName}}
        </el-form-item>
      </el-col>
      <!--基本多选框-->
      <el-col :span="8">
        <el-form-item label="创建日期" placeholder="" prop="subjectId">
          {{ruleFrom.destroyDate}}
        </el-form-item>
      </el-col>
      <el-col :span="8">
        <el-form-item label="备注" placeholder="" prop="subjectId">
          {{ruleFrom.destroyNote}}
        </el-form-item>
      </el-col>
    </el-row>


    <!--数据表格-->
    <el-row>
      <el-col :span="24">
        <el-form-item>
          <el-table
              :data="ruleFrom.details"
              border
              style="width: 100%">
            <el-table-column
                prop="drugEntity.drugName"
                label="药品名"
                width="180">
            </el-table-column>
            <el-table-column
                prop="destroyNumber"
                label="亏损数量">
            </el-table-column>

            <el-table-column
                prop="drugEntity.lyhSupplierEntity.supplierName"
                label="供应商">
            </el-table-column>
            <el-table-column
                prop="detailsDate"
                label="销毁日期">
            </el-table-column>

            <el-table-column
                prop="destroyName"
                label="销毁人">
            </el-table-column>

            <el-table-column
                prop="piCi"
                label="批次">

            </el-table-column>
          </el-table>
        </el-form-item>
      </el-col>
    </el-row>

  </el-form>

</template>

<script>
import http, {service} from "@/http/request";

export default {
  name: "destroyRecordDetails",
  data() {
    return {
      ruleFrom:{
        destroyId:'',
        destroyDate:'',
        destroyNote:"",
        destroyName:"",
        details:[]
      }
    }
  },
  methods:{
    // 跳转返回指定的页面
    goBack() {
      this.$router.push({
        path: '/destroyRecord'
      })
    },
  },
  created() {
    this.ruleFrom=JSON.parse(this.$route.query.value);
    console.log(this.ruleFrom)

  }
}
</script>

<style scoped>

</style>
